import request from "../util/request";
//请求广告
export const addAdvRequest = (myForm) =>{
    return request.post('/addAdv',myForm)
}
//查询广告
export const advListRequest = (pageNo,everyNum)=>{
    return request.get(`/advList/${pageNo}/${everyNum}`)
  }
//删除广告
export const deleteAdvRequest =(_id)=>{
    return request.delete('/deleteAdv',{
        params:{
            _id
        }
    })
}
//点击跟新广告时，获取广告数据，传回来
export const getUpdateDataRequest = (_id)=>{
    return request.get('/getUpdateData',{
        params:{
            _id
        }
    })
}
//点击跟新修改数据
export const updateAdvRequest =(formData,_id)=>{
    return request.put('/updateAdv',formData,{
        params:{
            _id
        }
    })
}